const columns = (FormModal, onRemove, namespace) => {
  return [
      {
          type: 'selection',
          title: '#',
          width: 60
      },
      {
          type: 'index',
          width: 60,
          align: 'center'
      },
      {
          title: '名称',
          key: 'name',
          width: 180
      },
      {
          title: '值',
          key: 'value',
          width: 180
      },
      {
          title: '编码',
          // width:180,
          key: 'code'
      },
      {
          title: '创建日期',
          key: 'ctime',
          width: 180
      },
      {
          title: '维护日期',
          key: 'mtime',
          width: 180
      }, {
          title: '操作',
          key: 'operation',
          width: 140,
          render: (h, { row, column, index }) => {
              return h('div', [
                  h(FormModal, {
                      props: {
                          title: '编辑权限',
                          record: row,
                          option: 'update',
                          namespace,
                          type: 'text',
                          size: 'small',
                          perm: 'dic:update'
                      }
                  }, '编辑'),
                  h('IButton', {
                      on: {
                          click: () => onRemove(row.id)
                      },
                      props: {
                          type: 'text',
                          size: 'small',
                          click: true,
                          perm: 'dic:remove'
                      },
                  }, '删除')
              ]);
          }
      }
  ]
}
export default columns;
